import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

public class Text {
    public static void main(String[] args) {
        TextBinaryTree textBinaryTree=new TextBinaryTree();
        TextBinaryTree.TreeNode root=textBinaryTree.creatTree();
        /*System.out.println("层序遍历");
        textBinaryTree.levelOrder(root);*/
        System.out.println("=========");
        System.out.println("分层遍历");
        System.out.println(textBinaryTree.levelOrder1(root));
    }
    public static void main1(String[] args) {
        TextBinaryTree textBinaryTree = new TextBinaryTree();
        TextBinaryTree.TreeNode root = textBinaryTree.creatTree();
        textBinaryTree.preOrder(root);
        System.out.println();
        textBinaryTree.inOrder(root);
        System.out.println();
        textBinaryTree.postOrder(root);
        System.out.println("===========");
        System.out.println("节点个数：" + textBinaryTree.size(root));
        System.out.println("叶子节点个数：" + textBinaryTree.getLeafNodeCount(root));
        System.out.println("第k层节点个数：" + textBinaryTree.getKLevelNodeCount(root, 4));
        System.out.println("二叉树的高度：" + textBinaryTree.getHeight(root));
        TextBinaryTree.TreeNode ret = textBinaryTree.find(root, 'E');
        System.out.println("查找：" + ret.val);
        System.out.println("===================");
    }
}
